package com.echo.register.commons.config;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiaoti
 * @Title: RequestHolder
 * @ProjectName MyConcurrence
 * @Description:
 * @date 2018/8/2610:10 PM
 */
public class RequestHolder {

    private final static ThreadLocal<HttpServletRequest> requestHolder = new ThreadLocal<>();

    public static void add(HttpServletRequest request){
        requestHolder.set(request);
    }

    public static HttpServletRequest getReques(){
        return requestHolder.get();
    }

    public static void remove(){
        requestHolder.remove();
    }
}
